tooling: Add Makefile and npm hooks for dev workflow.#229
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a unified developer workflow for this MicroPython driver repository by introducing a root Makefile and Node-based Git hooks (Husky) to standardize common dev tasks and enforce commit/branch conventions.
Changes:
- Add a root
Makefileto wrap linting, testing (mock/hardware), examples validation, and board interaction commands. - Add
package.json/package-lock.jsonpluscommitlint.config.jsto support Husky hooks, commitlint, lint-staged, and branch-name validation. - Add Husky hook scripts and update
.gitignorefor Node-related artifacts.
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
Makefile |
Introduces make install/lint/test/... commands for day-to-day development tasks. |
package.json |
Adds devDependencies and config for husky, commitlint, lint-staged, branch validation, and precommit checks. |
package-lock.json |
Locks npm dependency graph for reproducible installs. |
commitlint.config.js |
Defines project-specific commitlint rules (types/scopes/length). |
.husky/pre-commit |
Runs branch validation, precommit checks, and lint-staged. |
.husky/commit-msg |
Enforces commit message format via commitlint. |
.gitignore |
Ignores node_modules/ and a few additional artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| .PHONY: install | ||
| install: ## Install dev tools and git hooks | ||
| pip install ruff pytest |
There was a problem hiding this comment.
install installs ruff/pytest without the repo’s pinned dev requirements and misses dependencies that the repo actually uses (e.g. pyyaml for tests and mpremote for repl/mount and hardware test runner). Consider installing from .github/workflows/requirements.txt (keeps versions aligned with CI) and include mpremote, using python -m pip to respect the active venv.
| pip install ruff pytest | |
| python3 -m pip install -r .github/workflows/requirements.txt mpremote |
|
|
||
| .PHONY: test-driver | ||
| test-driver: ## Run tests for one driver (usage: make test-driver DRIVER=hts221) | ||
| python3 -m pytest tests/ -v -k "$(DRIVER)" --port $(PORT) -s |
There was a problem hiding this comment.
test-driver uses -k "$(DRIVER)", but this test suite already provides a dedicated --driver option in tests/conftest.py. Using -k will match substrings in nodeids and may select the wrong set of tests (or none). Switch this to --driver $(DRIVER) to match the documented/implemented driver filter.
| python3 -m pytest tests/ -v -k "$(DRIVER)" --port $(PORT) -s | |
| python3 -m pytest tests/ -v --driver $(DRIVER) --port $(PORT) -s |
| @@ -0,0 +1 @@ | |||
| npx --no-install validate-branch-name && npx --no-install git-precommit-checks && npx --no-install lint-staged | |||
There was a problem hiding this comment.
These Husky hook files don’t include a shebang (e.g. #!/usr/bin/env sh). Depending on platform and how Git executes the hook, a missing shebang can cause the hook to fail to run. Add the standard Husky header (and any required initialization for your Husky major version) so the hooks execute reliably.
| @@ -0,0 +1 @@ | |||
| npx --no-install commitlint --edit "$1" | |||
There was a problem hiding this comment.
This Husky hook file doesn’t include a shebang (e.g. #!/usr/bin/env sh). Depending on platform and how Git executes the hook, a missing shebang can cause the hook to fail to run. Add the standard Husky header (and any required initialization for your Husky major version) so the hook executes reliably.
| 'subject-full-stop': [0], | ||
| 'header-max-length': [2, 'always', 78], | ||
| 'scope-enum': [ | ||
| 1, |
There was a problem hiding this comment.
scope-enum is configured with severity 1 (warning), which means invalid scopes will typically not fail the commit-msg hook. If the intent is to enforce the allowed scopes (as described in the PR), set the rule severity to 2 so invalid scopes are rejected.
| 1, | |
| 2, |
| "@commitlint/config-conventional": "^20.5.0", | ||
| "git-precommit-checks": "^3.1.0", | ||
| "husky": "^9.1.7", | ||
| "lint-staged": "^16.4.0", |
There was a problem hiding this comment.
lint-staged@16.4.0 pulls in a Node engine requirement of >=20.17 (per package-lock.json). Since this repo previously didn’t declare a Node version, developers on Node 18 LTS will hit install/runtime errors unexpectedly. Consider either pinning lint-staged to a version compatible with your supported Node range, or declaring an explicit engines.node in package.json.
| "lint-staged": "^16.4.0", | |
| "lint-staged": "^15.0.0", |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3761702976
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| .PHONY: install | ||
| install: ## Install dev tools and git hooks | ||
| pip install ruff pytest |
There was a problem hiding this comment.
Install PyYAML in dev setup target
make install currently installs only ruff and pytest, but the test suite imports yaml (for example in tests/conftest.py and tests/test_scenarios.py). On a fresh environment, following this new workflow causes make test to fail with ModuleNotFoundError: No module named 'yaml', so the advertised setup target does not actually provision the dependencies needed for testing.
Useful? React with 👍 / 👎.
| 'type-enum': [ | ||
| 2, | ||
| 'always', | ||
| [ | ||
| 'build', |
There was a problem hiding this comment.
Allow existing scope-only commit subjects
The new type-enum restricts the leading token to conventional types and excludes driver scopes (e.g. hts221, ism330dl), so commit messages in the repository’s established <scope>: <Description.> format are rejected by the new commit-msg hook. This blocks contributors using the documented/project-native format unless they switch to a different convention, which creates workflow breakage.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ba7feea0f2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| .PHONY: prepare | ||
| prepare: ## Install git hooks | ||
| husky |
There was a problem hiding this comment.
Run Husky via npm exec in
prepare target
make setup invokes prepare directly from make, but husky is only installed in node_modules/.bin and that directory is not on PATH outside npm lifecycle scripts. In a normal fresh checkout this makes make setup fail at prepare with husky: No such file or directory, even after npm install; call Husky through npx --no-install husky (or npm exec husky) here so the advertised setup command works reliably.
Useful? React with 👍 / 👎.
|
|
||
| .PHONY: install | ||
| install: ## Install dev tools (pip + npm) | ||
| pip install ruff pytest |
There was a problem hiding this comment.
Install Python tools with the same interpreter used for tests
The Makefile installs dependencies with bare pip but runs tests with python3 -m pytest; on systems where pip targets a different interpreter (or is missing while only pip3 exists), make install succeeds/fails inconsistently and make test can still raise missing-module errors. Installing via python3 -m pip keeps the environment aligned with the test runner.
Useful? React with 👍 / 👎.
|
Note: the commit message format between commitlint (conventional commits) and the existing CI check ( |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7122f59b79
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| # Dynamic per-scenario targets (test-apds9960, test-hts221, etc.) | ||
| SCENARIOS := $(basename $(notdir $(wildcard tests/scenarios/*.yaml))) | ||
| $(foreach s,$(SCENARIOS),$(eval .PHONY: test-$(s))$(eval test-$(s): ; python3 -m pytest tests/ -v -k "$(s)" --port $$(PORT) -s)) |
There was a problem hiding this comment.
Match per-scenario filters to pytest scenario IDs
The generated test-<scenario> targets filter with -k "$(s)", where $(s) comes from the YAML filename stem, but test IDs are built from scenario name/driver (tests/test_scenarios.py), not necessarily from the filename. For example, tests/scenarios/wsen_hids.yaml uses driver: wsen-hids and tests/scenarios/board_temperature_comparison.yaml uses name: "Temperature comparison (all sensors)", so make test-wsen_hids and make test-board_temperature_comparison can select zero tests and fail with "no tests collected". Use the same identifier source as pytest (or --driver) when generating these targets.
Useful? React with 👍 / 👎.
| python3 -m pytest tests/ -v --port $(PORT) -s -k "board_ and hardware" | ||
|
|
||
| .PHONY: test-sensors | ||
| test-sensors: ## Run sensor driver hardware tests (I2C devices) | ||
| python3 -m pytest tests/ -v --port $(PORT) -s -k "hardware and not board_" |
There was a problem hiding this comment.
Select board tests by marker instead of name substring
These targets split board vs sensor suites using -k substring checks on board_, but board scenarios are identified by the board marker in the test generator (tests/test_scenarios.py marks board scenarios explicitly). Any board scenario whose ID does not contain board_ (e.g. name: "Temperature comparison (all sensors)") is omitted from test-board and incorrectly included by test-sensors, so both commands run the wrong scope. Use marker-based filtering (-m board and -m "hardware and not board") to make the target behavior correct.
Useful? React with 👍 / 👎.
| # --- Setup --- | ||
|
|
||
| # npm install is re-run only when package.json changes | ||
| node_modules/.package-lock.json: package.json |
There was a problem hiding this comment.
Reinstall npm deps when lockfile changes
The dependency stamp for node_modules/.package-lock.json only depends on package.json, so a pulled change that updates package-lock.json without changing package.json will not trigger npm install. That leaves node_modules potentially out of sync with the repository lockfile and can cause hook/tooling version drift between contributors. Include package-lock.json as a prerequisite (or avoid this stamp pattern) so installs remain reproducible.
Useful? React with 👍 / 👎.
nedseb
left a comment
There was a problem hiding this comment.
Addressed Copilot feedback:
-
pyyaml/mpremote missing — Fixed:
make installnow usespython3 -m pip install -e ".[dev,test]"which installs all deps from pyproject.toml extras. -
test-driveruses-kinstead of--driver— Good catch but-kis intentional here: it also matches board scenarios (e.g.make test-board_buttons). The dynamic targets handle per-driver testing. -
Husky shebang — Added
#!/usr/bin/env shto both hooks. -
scope-enum severity 1 — Kept at 1 (warning) intentionally to let the team adopt gradually. Will be enforced as error in a future PR (tracked in #232).
-
lint-staged Node >= 20.17 — Added
engines.nodein package.json to make this explicit. -
type-enum blocks old format — Known issue, tracked in #231.
-
prepare— husky not in PATH — Already handled byenv.mkwhich addsnode_modules/.binto PATH. -
python3 -m pipinstead ofpip— Fixed.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 17 changed files in this pull request and generated 10 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| # Dynamic per-scenario targets (test-apds9960, test-hts221, etc.) | ||
| SCENARIOS := $(basename $(notdir $(wildcard tests/scenarios/*.yaml))) | ||
| $(foreach s,$(SCENARIOS),$(eval .PHONY: test-$(s))$(eval test-$(s): ; python3 -m pytest tests/ -v -k "$(s)" --port $$(PORT) -s)) |
There was a problem hiding this comment.
Dynamic per-scenario targets are generated from YAML filenames (e.g. wsen_hids.yaml -> make test-wsen_hids), but pytest IDs use scenario.get('name', scenario.get('driver', ...)). For wsen_hids.yaml/wsen_pads.yaml, driver is wsen-hids/wsen-pads, so -k "wsen_hids" won't match and the generated make targets won't run any tests. Consider generating targets from the scenario name/driver fields (parsed from YAML) or aligning filenames/name with the driver string used in test IDs (e.g., rename YAMLs or add a name: matching the filename).
| $(foreach s,$(SCENARIOS),$(eval .PHONY: test-$(s))$(eval test-$(s): ; python3 -m pytest tests/ -v -k "$(s)" --port $$(PORT) -s)) | |
| $(foreach s,$(SCENARIOS),$(eval .PHONY: test-$(s))$(eval test-$(s): ; python3 -m pytest tests/ -v -k "$(s) or $(subst _,-,$(s))" --port $$(PORT) -s)) |
| { | ||
| "branches": ["main"], | ||
| "repositoryUrl": "https://github.com/steamicc/micropython-steami-lib.git", | ||
| "debug": "false", |
There was a problem hiding this comment.
In semantic-release config, debug should be a boolean, but it's currently the string "false". As written, semantic-release will treat it as truthy and may enable debug logging unexpectedly. Change it to the JSON boolean false.
| "debug": "false", | |
| "debug": false, |
| message: 'Aurais-tu oublié de terminer certaines tâches ? Aurais-tu une issue à ouvrir pour traiter cette tache plus tard ?', | ||
| nonBlocking: true, | ||
| regex: /(?:FIXME|TODO)/, | ||
| }, | ||
| { | ||
| message: 'Tu as des marqueurs de conflits qui traînent dans ton code', | ||
| regex: /^[<>|=]{4,}/m, | ||
| }, | ||
| { | ||
| message: | ||
| 'Arrêt du commit : tu as renseigné des choses qui ne doivent pas être commitées !', | ||
| regex: /do[\s]not[\s]commit/i, | ||
| }, | ||
| { | ||
| filter: /\.js$/, | ||
| message: '🤔 Hum ! N’as-tu pas oublié de retirer du "console.log(…)" ?', |
There was a problem hiding this comment.
The pre-commit messages are written in French and include emojis. Most repo documentation and tooling output is in English, so this can be confusing for contributors and CI logs. Consider switching these messages to English (or making the language configurable) and keeping output plain-text for maximum compatibility.
| message: 'Aurais-tu oublié de terminer certaines tâches ? Aurais-tu une issue à ouvrir pour traiter cette tache plus tard ?', | |
| nonBlocking: true, | |
| regex: /(?:FIXME|TODO)/, | |
| }, | |
| { | |
| message: 'Tu as des marqueurs de conflits qui traînent dans ton code', | |
| regex: /^[<>|=]{4,}/m, | |
| }, | |
| { | |
| message: | |
| 'Arrêt du commit : tu as renseigné des choses qui ne doivent pas être commitées !', | |
| regex: /do[\s]not[\s]commit/i, | |
| }, | |
| { | |
| filter: /\.js$/, | |
| message: '🤔 Hum ! N’as-tu pas oublié de retirer du "console.log(…)" ?', | |
| message: 'Did you forget to finish some tasks? Should you open an issue to handle this later?', | |
| nonBlocking: true, | |
| regex: /(?:FIXME|TODO)/, | |
| }, | |
| { | |
| message: 'You still have conflict markers left in your code.', | |
| regex: /^[<>|=]{4,}/m, | |
| }, | |
| { | |
| message: | |
| 'Commit stopped: you have included content that must not be committed.', | |
| regex: /do[\s]not[\s]commit/i, | |
| }, | |
| { | |
| filter: /\.js$/, | |
| message: 'Have you forgotten to remove a "console.log(...)" statement?', |
| }, | ||
| { | ||
| filter: /\.js$/, | ||
| message: '🤔 Hum ! N’as-tu pas oublié de retirer du "console.log(…)" ?', |
There was a problem hiding this comment.
console.log rule message also contains an emoji and uses a curly apostrophe (N’as-tu). Depending on terminal/font/encoding this can render poorly in hook output. Consider using ASCII-safe punctuation and consistent language with the rest of the repo.
| message: '🤔 Hum ! N’as-tu pas oublié de retirer du "console.log(…)" ?', | |
| message: 'Hum ! N\'as-tu pas oublié de retirer du "console.log(...)" ?', |
| @@ -0,0 +1,4 @@ | |||
| module.exports = { | |||
| pattern: "^(main)$|^(feat|fix|docs|tooling|ci|test|style|chore|refactor)\/([a-z0-9]+-)*[a-z0-9]+$|^release\/v([0-9]+)\\.([0-9]+)\\.([0-9]+)([a-z0-9-]*)$", | |||
| errorMsg: "🤨 La branche que tu essaies de pusher ne respecte pas nos conventions, tu peux la renommer avec `git branch -m <nom-actuel> <nouveau-nom>`", | |||
There was a problem hiding this comment.
Branch-name validation error message is in French and includes emojis, while the repo docs are primarily English. Consider switching to an English message (or making language configurable) so the hook output is understandable for all contributors.
| errorMsg: "🤨 La branche que tu essaies de pusher ne respecte pas nos conventions, tu peux la renommer avec `git branch -m <nom-actuel> <nouveau-nom>`", | |
| errorMsg: "The branch name does not follow our conventions. You can rename it with: `git branch -m <current-name> <new-name>`", |
| .PHONY: install | ||
| install: node_modules/.package-lock.json ## Install dev tools (pip + npm) | ||
| python3 -m pip install -e ".[dev,test]" | ||
|
|
There was a problem hiding this comment.
pip install -e ... can pick up the wrong Python environment (e.g., if pip points to a different interpreter than python3). Using python3 -m pip install -e ... (or $(PYTHON) -m pip with a configurable PYTHON var) makes the install target more reliable.
|
|
||
| .PHONY: prepare | ||
| prepare: node_modules/.package-lock.json ## Install git hooks | ||
| husky |
There was a problem hiding this comment.
prepare runs husky with no arguments. Husky typically needs an explicit install step (e.g. setting core.hooksPath and creating .husky/_) for hooks to actually run; calling husky alone is likely a no-op or help output. Please ensure make prepare performs the actual installation step so git hooks are activated after make setup.
| husky | |
| husky install |
| Commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/) format, enforced by commitlint via a git hook: | ||
|
|
||
| ``` | ||
| <scope>: <Description starting with a capital letter ending with a period.> | ||
| <type>(<scope>): <Description starting with a capital letter ending with a period.> | ||
| ``` | ||
|
|
||
| The scope is the driver name or domain (`hts221`, `ism330dl`, `docs`, `tests`, `ci`...). There is no predefined list of types — the scope is free-form. | ||
| **Types**: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `ci`, `build`, `chore`, `perf`, `revert`, `tooling` | ||
|
|
||
| **Scopes**: driver names (`hts221`, `ism330dl`, `wsen-pads`...) or domains (`ci`, `docs`, `style`, `tests`, `tooling`). |
There was a problem hiding this comment.
The documented commit format shows <type>(<scope>): ..., but the examples include docs: ... (no scope). Conventional Commits makes scope optional, and commitlint typically doesn't require it unless explicitly configured. Suggest updating the docs to indicate that (scope) is optional (and clarify whether you want to require it or not).
| 5. Push your branch to the repository | ||
| 6. Open a Pull Request | ||
| 1. Set up your environment: `make setup` | ||
| 2. Create a branch from main (format: `feat/`, `fix/`, `docs/`, `tooling/`, `ci/`, `test/`, `style/`) |
There was a problem hiding this comment.
Workflow section lists allowed branch prefixes as feat/, fix/, docs/, tooling/, ci/, test/, style/, but the actual validation regex also allows chore/ and refactor/. Align the documentation with the enforced pattern so contributors don't get surprised by hooks rejecting/accepting names differently.
| 2. Create a branch from main (format: `feat/`, `fix/`, `docs/`, `tooling/`, `ci/`, `test/`, `style/`) | |
| 2. Create a branch from main (format: `feat/`, `fix/`, `docs/`, `tooling/`, `ci/`, `test/`, `style/`, `chore/`, `refactor/`) |
| @@ -0,0 +1,2 @@ | |||
| export PATH := $(shell pwd)/node_modules/.bin:$(PATH) | |||
There was a problem hiding this comment.
Using $(shell pwd) makes Make spawn a subshell at parse time and can behave unexpectedly if make is invoked with a different working directory. $(CURDIR) is the standard Make built-in for the current directory and is usually more portable/reliable for constructing PATH.
| export PATH := $(shell pwd)/node_modules/.bin:$(PATH) | |
| export PATH := $(CURDIR)/node_modules/.bin:$(PATH) |
nedseb
left a comment
There was a problem hiding this comment.
Addressed Codex feedback:
-
P1 — Install PyYAML — Already fixed:
make installusespip install -e ".[dev,test]"which includes pyyaml. -
P2 — Allow existing scope-only commits — Known issue, tracked in #231.
-
P1 — Run Husky via npm exec — Already handled:
env.mkaddsnode_modules/.binto PATH, sohuskyis found directly. -
P2 — python3 -m pip — Fixed in previous commit.
-
P1 — Per-scenario filters match pytest IDs — Fixed: dynamic targets now use the
driverfield from YAML (for driver scenarios) or the filename stem (for board scenarios). Theboard_temperature_comparison.yamlname field was aligned with the filename. Convention documented in TESTING.md. -
P1 — Board tests by marker — The
-k board_filter works correctly for all board scenarios now that names are aligned with filenames. Marker-based filtering would require changes to the test generator which is out of scope. -
P2 — Reinstall on lockfile change — Fixed:
package-lock.jsonadded as prerequisite to the npm install target.
nedseb
left a comment
There was a problem hiding this comment.
Addressed second round of Copilot feedback (214fca4):
- Dynamic targets use filenames — Already fixed in previous commit (uses
driverfield). .releaserc.jsondebug string — Fixed: changed"false"tofalse.- French messages + emojis in hooks — Kept intentionally: consistent with makecode-steami config. All STeaMi repos use French for developer-facing messages.
pipvspython3 -m pip— Already fixed.huskyno-op — Husky v9 installs hooks with justhusky(nohusky installneeded).- Scope optional not documented — Fixed: format shows
[(<scope>)]with note that scope is optional. - Branch prefixes incomplete — Fixed: added
chore/andrefactor/to documentation. $(shell pwd)→$(CURDIR)— Fixed in env.mk.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 214fca414b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| #!/usr/bin/env sh | ||
| npx --no-install validate-branch-name && npx --no-install git-precommit-checks && npx --no-install lint-staged |
There was a problem hiding this comment.
Mark Husky hook scripts executable
These hook files were added with mode 100644, so Git ignores them instead of executing them (.husky/pre-commit/.husky/commit-msg are treated as non-executable). In a fresh clone this means the new commit-msg and pre-commit checks are silently bypassed, so invalid commit messages and unlinted staged Python changes can still be committed even after make setup.
Useful? React with 👍 / 👎.
| node_modules/.package-lock.json: package.json package-lock.json | ||
| npm install | ||
| @touch $@ |
There was a problem hiding this comment.
Fail fast when npm install fails in setup target
Because .ONESHELL is enabled globally, this multi-line recipe runs in one shell without -e; if npm install fails but node_modules/ already exists, the subsequent touch still succeeds and the target exits 0, leaving a false success stamp. That can make make install/make setup proceed with stale or missing Node tooling while reporting success, which breaks the reproducibility this target is meant to provide.
Useful? React with 👍 / 👎.
|
🎉 This PR is included in version 0.0.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
Closes #201.
Unified developer tooling: Makefile as primary interface + npm for git hooks and release management.
Makefile (
make help)make installmake preparemake setupmake lint/make lint-fixmake testmake test-mockmake test-hardwaremake test-boardmake test-sensorsmake test-allmake test-<scenario>make test-hts221)make test-examplesmake cimake buildmake repl/make mountmake clean/make deepcleanPer-scenario targets (
test-apds9960,test-hts221, etc.) are generated dynamically fromtests/scenarios/*.yaml.Git hooks (npm + husky)
Configuration files
Makefileenv.mkpackage.jsoncommitlint.config.js.validate-branch-namerc.jsgit-precommit-checks.config.js.prettierrc.json.releaserc.json.husky/commit-msg.husky/pre-commitnpm devDependencies
husky, commitlint, commitizen, lint-staged, validate-branch-name, git-precommit-checks, prettier, semantic-release + plugins, cross-env
Test plan
make help— 19 targets displayed correctlymake lint— All checks passedmake test-mock— 164 passedmake test-examples— 191 passedmake ci— lint + tests + examples all greenmake test— runs mock + displays info messagemake test-apds9960— dynamic target works (24 passed)make test-hts221— dynamic target works (26 passed)tooling/makefile-npm-hooksmake deepclean+make installreinstalls node_modules